package online.longzipeng.householdbillssystem.business.vo.bill;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "账单修改对象",description = "请求参数类")
public class BillUpdateVO {

    @ApiModelProperty(value = "id",required = true)
    @Min(0)
    private Integer id;

    @ApiModelProperty(value = "内容",example = "买菜",required = false)
    private String content;

    @ApiModelProperty(value = "账单类型id",example = "1",required = false)
    @Min(0)
    private Integer billTypeId;

    @ApiModelProperty(value = "用户Id",example = "1",required = false)
    @Min(0)
    private Integer userId;

    @ApiModelProperty(value = "花费",example = "10",required = false)
    @Min(0)
    private BigDecimal money;

    @ApiModelProperty(value = "时间",example = "2020-10-11 13:14:00",required = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date time;

}